layui.form.verify({
    pwd:[/^\S{6,12}$/,'密码长度应该是6-12位'],
    repwd:function (value) {
        if($('[name = "newPwd"]').val() =! value){
            return '密码不一致'
        }    
    }
})
$('#pwdForm').on('submit',function(e) {
  e.preventDefault();
     $.ajax({
    type:'post',
    url:'/my/updatepwd',
    data:$('#pwdForm').serialize(),
    success:function(res) {
        localStorage.removeItem('token')
        window.parent.location.href = '/login.html'
    }
    })
})